package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotGuestReservationMapper;
import com.gaohe.hotal.domain.HotGuestReservation;
import com.gaohe.hotal.service.IHotGuestReservationService;

/**
 * 客户预订Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotGuestReservationServiceImpl implements IHotGuestReservationService 
{
    @Autowired
    private HotGuestReservationMapper hotGuestReservationMapper;

    /**
     * 查询客户预订
     * 
     * @param reservationId 客户预订主键
     * @return 客户预订
     */
    @Override
    public HotGuestReservation selectHotGuestReservationByReservationId(Long reservationId)
    {
        return hotGuestReservationMapper.selectHotGuestReservationByReservationId(reservationId);
    }

    /**
     * 查询客户预订列表
     * 
     * @param hotGuestReservation 客户预订
     * @return 客户预订
     */
    @Override
    public List<HotGuestReservation> selectHotGuestReservationList(HotGuestReservation hotGuestReservation)
    {
        return hotGuestReservationMapper.selectHotGuestReservationList(hotGuestReservation);
    }

    /**
     * 新增客户预订
     * 
     * @param hotGuestReservation 客户预订
     * @return 结果
     */
    @Override
    public int insertHotGuestReservation(HotGuestReservation hotGuestReservation)
    {
        hotGuestReservation.setCreateTime(DateUtils.getNowDate());
        return hotGuestReservationMapper.insertHotGuestReservation(hotGuestReservation);
    }

    /**
     * 修改客户预订
     * 
     * @param hotGuestReservation 客户预订
     * @return 结果
     */
    @Override
    public int updateHotGuestReservation(HotGuestReservation hotGuestReservation)
    {
        hotGuestReservation.setUpdateTime(DateUtils.getNowDate());
        return hotGuestReservationMapper.updateHotGuestReservation(hotGuestReservation);
    }

    /**
     * 批量删除客户预订
     * 
     * @param reservationIds 需要删除的客户预订主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestReservationByReservationIds(Long[] reservationIds)
    {
        return hotGuestReservationMapper.deleteHotGuestReservationByReservationIds(reservationIds);
    }

    /**
     * 删除客户预订信息
     * 
     * @param reservationId 客户预订主键
     * @return 结果
     */
    @Override
    public int deleteHotGuestReservationByReservationId(Long reservationId)
    {
        return hotGuestReservationMapper.deleteHotGuestReservationByReservationId(reservationId);
    }
}
